<div id="singha">
	<!--Live Stream-->
	<div id="liveStream">
		<h2>ตารางคอนเสิร์ต ลานเบียร์สิงห์เดือนธันวาคม 2557</h2>
		<!--Social-->
		<div id="social">
			<a href="javascript:void(0);" class="facebook">&nbsp;</a>
			<a href="javascript:void(0);" class="twitter">&nbsp;</a>
			<a href="javascript:void(0);" class="youtube">&nbsp;</a>
		</div>
		<?php if($is_stream):?>
		<!--Stream Player-->
		<div id="LiveStreamPosition">
			<div id="liveHeader"><?php echo image_asset('home/singha/live_header.png','',array('width' => 640,'height' => 40));?></div>
			<div id="SinghaStreamPlayer">
				<?php if($this->agent->is_mobile()):?>
				<video id='my_video' controls muted preload='none'></video>
				<?php endif;?>
			</div>
		</div>
		<script type="text/javascript" language="javascript">
			(function($) {
					/*whatever jQuery stuff*/
					$(function(){					
							var is_mobile = '<?php echo $this->agent->is_mobile();?>';
							var url_html5 = "http://203.151.21.9:1935/live/singhabeerpark2014_test/playlist.m3u8";
							var url_flash = "rtmp://203.151.21.9/live";
							if(is_mobile){
								//Set Video Source
								$('#SinghaStreamPlayer > #my_video').append("<source id='mp4' src='"+url_html5+"' type='video/mp4'>");
								$('#SinghaStreamPlayer > #my_video').attr('src',""+url_html5+"");
								$('#SinghaStreamPlayer > #my_video').attr('width',640);
								$('#SinghaStreamPlayer > #my_video').attr('height',360);		
								// videoplaza sdk, 4 sec time-out, callback function
								loadScript("<?php echo js_asset_url('media/html5-sdk-1.0.12.15.1-ea.min.js');?>",4000,initVideoplaza);
								// *** START - videoplaza plugin config ***
								vpConfig = {
									vphost : 'http://th-pmdplus.videoplaza.tv',
									category : 'live',
									tags : ['standard'],
									flags: [],
									playbackPosition: [] // mid-roll cue points, if any.
								}
								// *** END - videoplaza plugin config ***
								//Auto Play && Loop
								$('#SinghaStreamPlayer > #my_video').attr('autoplay','autoplay');	
							} else {
								jwplayer("SinghaStreamPlayer").setup({
										autostart: true,
										mute: false,
										flashplayer: "<?php echo js_asset_url('media/player.swf');?>",
										width: 640,
										height: 360,
										streamer: ""+url_flash+"",
										file: "singhabeerpark2014_test",
										provider: "rtmp",															
										plugins: "<?php echo js_asset_url('media/vp_plugin.swf');?>",
										vpdomain: "http://th-pmdplus.videoplaza.tv",
										vpshares: "live",
										vptimeout: 15000,
										vptags: "",
										stretching : "exactfit",
										closebuttontimeout: 5
									});									
							}
						});	
				})(jQuery);					
		</script>
		<?php endif;?>
	</div>
	<!--Calendar-->
	<div id="calendar">
		<?php echo image_asset('home/singha/calendars.jpg');?>
	</div>
	<?php if(false):?>
	<!--Video-->
	<div id="video">
		<h2>วิดีโอแนะนำ</h2>
		<span class="iconVideo">&nbsp;</span>
		<div id="video_slider">
			<div class="cycleElementsContainer" id="slider">
				<div id="cycle-prev" class="arrow left"></div>
				<div class="slider">
					<ul>
						<?php for($i=1;$i<7;$i++):?>						
						<li>
							<a href="http://www.youtube.com/embed/YhjR1oQkEws?rel=0&amp;wmode=transparent&amp;autoplay=true" rel="youtube" title="Title">
								<div class="image">
									<?php echo image_asset('home/singha/image0'.$i.'.jpg','',array('width' => 220,'height' => 125));?>
									<span class="icon_play"></span>
								</div>
							</a>
							<h3>Title</h3>
							<p>Description</p>
						</li>
						<?php endfor;?>
					</ul>
				</div>
				<div id="cycle-next" class="arrow right"></div>
			</div>
		</div>	
	</div>
	<!--Gallery-->
	<div id="gallery">
		<h2>แกลลอรี่รูปภาพ</h2>
		<span class="iconGallery">&nbsp;</span>
		<ul>
			<?php for($i=1;$i<7;$i++):?>						
			<li>
				<a href="http://static.you2play.com/2013/assets/images/home/singha/demo.jpg" rel="gallery">
					<div class="image">
						<?php echo image_asset('home/singha/image0'.$i.'.jpg','',array('width' => 220,'height' => 125));?>
					</div>
				</a>
			</li>
			<?php endfor;?>
		</ul>	
	</div>
	<script type="text/javascript" language="javascript">
	    (function($) {
	        /*whatever jQuery stuff*/
	        $(function(){				
				//multipleElementsCycle
				$("#slider").multipleElementsCycle({
					scrollCount: 3,
					show: 3,
					start: 0
				});			
				
				//colorbox
				$('a[rel="youtube"]').colorbox({iframe:true, innerWidth:640, innerHeight:360,current:''});
				$('a[rel="gallery"]').colorbox();
	        });
	    })(jQuery);
	</script>
	<?php endif;?>
</div>